package com.lanxiao.cloud.modules.oauth.application.dto;

import com.lanxiao.cloud.common.core.enums.StateEnum;
import com.lanxiao.cloud.modules.oauth.infrastructure.enums.LoginType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;

/**
 * @author ：qiaoliang
 * @date ：2021-10-20
 */
@ApiModel("登录用户列表返回模型")
public class UserDetailsDto {
  @ApiModelProperty(value = "id")
  private final Long id;
  @ApiModelProperty(value = "昵称")
  private final String name;
  @ApiModelProperty(value = "头像")
  private final String portrait;
  @ApiModelProperty(value = "登录类型")
  private final LoginType type;
  @ApiModelProperty(value = "登录账号")
  private final String principal;
  @ApiModelProperty(value = "登录状态")
  private final StateEnum state;
  @ApiModelProperty(value = "登录地区")
  private final String region;
  @ApiModelProperty(value = "登录IP")
  private final String ip;
  @ApiModelProperty(value = "浏览器")
  private final String browser;
  @ApiModelProperty(value = "操作系统")
  private final String operatingSystem;
  @ApiModelProperty(value = "标识码")
  private final String uuId;
  @ApiModelProperty(value = "登录时间")
  private final Date time;

  public UserDetailsDto(Long id, String name, String portrait,
      LoginType type, String principal, StateEnum state, String region, String ip,
      String browser,
      String operatingSystem, String uuId, Date time) {
    this.id = id;
    this.name = name;
    this.portrait = portrait;
    this.type = type;
    this.principal = principal;
    this.state = state;
    this.region = region;
    this.ip = ip;
    this.browser = browser;
    this.operatingSystem = operatingSystem;
    this.uuId = uuId;
    this.time = time;
  }

  public Long getId() {
    return id;
  }

  public String getName() {
    return name;
  }

  public String getPortrait() {
    return portrait;
  }

  public LoginType getType() {
    return type;
  }

  public String getPrincipal() {
    return principal;
  }

  public StateEnum getState() {
    return state;
  }

  public String getRegion() {
    return region;
  }

  public String getIp() {
    return ip;
  }

  public String getBrowser() {
    return browser;
  }

  public String getOperatingSystem() {
    return operatingSystem;
  }

  public String getUuId() {
    return uuId;
  }

  public Date getTime() {
    return time;
  }

}
